package com.jrx.anytxn.param.service.aviator;


import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.param.dto.aviator.RuleMatchReq;

import java.util.List;
import java.util.Map;

/**
 * @author cjz
 * @date 2018-11-05
 **/
public interface IAviatorService {

    /**
     * 执行Aviator匹配 返回json结果
     *
     * @param ruleMatchDTO 要比较规则参数
     * @return 匹配后的规则ResponseDto
     */
    String executeRule(RuleMatchReq ruleMatchDTO);

    /*
     * 执行Aviator匹配 并返回map结果，匹配优先级高的一条规则
     *
     * @param ruleMatchDTO 规则请求类
     * @return 结果map
     */
    Map<String, Object> executeRuleResultMap(RuleMatchReq ruleMatchDTO) throws TxnBizException;

    /**
     * 执行Aviator匹配,匹配全部规则
     * @author fan.yang
     * date: 2019/11/30 0030 下午 14:57
     * @param ruleMatchDTO
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     */
    List<Map<String,Object>> executeRuleList(RuleMatchReq ruleMatchDTO) throws Exception;

}
